public class code9_14 {

    public static void main(String[] args) {
        Sum sum = new Sum(1,2,3);
        System.out.println(sum.calculate());
    }
}
class Base{
    public int x;
    public int y;
    Base(int x,int y){
        this.x = x;
        this.y = y;
    }
}
class Sum extends Base{
    public int z;
    public int calculate(){
        return z*x*y;
    }
    Sum(int z,int x,int y) {
        super(x,y);
        this.z =z;
    }
}